home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
k
/
kids7.dms
/
kids7.adf
/
CARDS.AMOS
/
CARDS.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1992-10-04
|
5KB
|
106 lines
Global NAME$,LEVEL,SCORE,XX$
CHOOSE
Procedure CHOOSE
Colour Back $BBB : Load "kids-7:bits/tsam.abk",5 : Sam Loop On : Sam Play 15,1,8500
Extension_5_0120 "kids-7:bits/cardpic.abk",10
Unpack 10 To 0 : Screen Display 0,108,32,, : Get Fonts
A$=Command Line$ : A=Instr(A$,"|") : B=Instr(A$,"/") : C=Instr(A$,"\") : L=Len(A$)
NAME$=Left$(A$,A-1) : L$=Mid$(A$,A+1,B-A-1) : LEVEL=Val(L$)
XX$=Mid$(A$,B+1,C-B-1) : S$=Right$(A$,L-C) : SCORE=Val(S$)
Set Font 3 : Ink 11,21 : X Mouse=374 : Y Mouse=241 : Limit Mouse 138,56 To 429,274 : L=1
If XX$="..." Then Cls 21 : Goto ALOVER
Reserve Zone 3
Set Zone 1,50,23 To 181,121
Set Zone 2,203,34 To 335,121
Set Zone 3,50,144 To 181,232
If Mid$(XX$,1,1)="." Then Cls 31,52,36 To 179,119 : Reset Zone 1 : Locate 10,10 : Print " SOLD OUT "
If Mid$(XX$,2,1)="." Then Cls 31,205,36 To 332,119 : Reset Zone 2 : Locate 30,10 : Print " SOLD OUT "
If Mid$(XX$,3,1)="." Then Cls 31,53,145 To 179,229 : Reset Zone 3 : Locate 10,23 : Print " SOLD OUT "
Do
MZ=Mouse Zone : MK=Mouse Key
If MZ<>L
Cls 21,199,175 To 341,213
T$=" " : If FL=1 : Flash Off : FL=0 : End If
If MZ=1 : T$="Mountains" : End If
If MZ=2 : T$="Beach" : End If
If MZ=3 : T$="Forest" : End If
If MZ=0
T$="Click A Card"
Flash 11,"(F00,37)(0F0,37)(00F,37)" : FL=1
End If
T=Text Length(T$) : TX=(380-T)/2 : TX=TX+80
Gr Writing 1 : Ink 23,21 : Text TX+1,200,T$
Gr Writing 8 : Ink 11,21 : Text TX,198,T$ : L=MZ
End If
Exit If MK>0 and MZ>0
Loop
Screen Close 0 : Screen Open 0,640,210,4,Hires : Curs Off : Flash Off : Palette $BBB,$F,$FFF,$555 : Cls 0 : Double Buffer
Cls 2,70,10 To 550,200 : Ink 3 : Draw 71,200 To 551,200 : Draw 551,11 To 551,200
Get Fonts : Set Font 3 : Ink 1,2
Draw 400,32 To 400,180 : Draw 401,32 To 401,180 : Draw 410,80 To 540,80
Draw 410,100 To 540,100 : Draw 410,120 To 540,120 : Draw 410,140 To 540,140 : Draw 410,160 To 540,160
Limit Mouse 163,60 To 370,206 : Wait Vbl
Text 90,30,"Dear Duncan," : On MZ Gosub MTEX,BTEX,FTEX
Paste Bob 255,154,1 : IM=3 : Paste Bob 476,17,IM : Channel 1 To Bob 1 : Hide : Bob 1,100,100,2
Amal 1,"H: L X=XS(0,XM); L Y=YS(0,YM); J H" : Amal On 1
Repeat
MK=Mouse Key
Until MK>0 and X Mouse>363 and Y Mouse<107
Sam Loop Off : Amal Off 1 : Show
A$=NAME$+"|"+Str$(LEVEL)+"/"+XX$+"\"+Str$(SCORE) : Command Line$=A$
If MZ=1 Then Run "KIDS-7:CLIMB.AMOS"
If MZ=2 Then Run "KIDS-7:beach.amos"
If MZ=3 Then Run "KIDS-7:forest.amos"
End
'
MTEX:
Text 90,50,"While climbing up a mountain"
Text 90,70,"I slipped and fell off."
Text 90,90,"I was saved by a handy"
Text 90,110,"branch and "+NAME$+" who"
Text 90,130,"found some rocks to pile"
Text 90,150,"up so I could climb down"
Text 90,170,"to safety."
Text 140,190,"Your little"
Return
FTEX:
Text 90,50,"While walking in the forest"
Text 90,70,"I got lost and could not"
Text 90,90,"find my way out. Thank"
Text 90,110,"goodness for "+NAME$+" who"
Text 90,130,"worked out which was the"
Text 90,150,"right path to get back"
Text 90,170,"to the exit."
Text 140,190,"Your little"
Return
BTEX:
Text 90,50,"There was a sand castle"
Text 90,70,"building competition on the"
Text 90,90,"beach. With a little bit of"
Text 90,110,"help from "+NAME$+" I was"
Text 90,130,"able to make some great"
Text 90,150,"sand castles."
Text 90,170," "
Text 140,190,"Your little"
Return
ALOVER:
Screen Close 0 : Wait Vbl : Screen Open 0,640,200,4,Hires : Screen Hide 0 : Curs Off : Flash Off
Palette $BBB,$F,$FFF,$555 : Set Font 3
Unpack 9 To 1 : Screen To Back : Get Bob 1,1,0,0 To 180,56 : Screen 0
Cls 0 : Cls 2,50,5 To 500,190 : Ink 3
Draw 50,190 To 500,190 : Draw 500,5 To 500,190
Draw 51,191 To 501,191 : Draw 501,6 To 501,191
Ink 1,2 : Text 90,25,"Dear "+NAME$+","
Text 90,55,"Thank you for looking after me."
Text 90,75,"You gained "+Str$(SCORE)+" points."
Text 90,95,"I hope you will look after me"
Text 90,115,"next time I go on holiday."
Text 90,150,"Your little"
Wait Vbl : Screen Show 0
Paste Bob 200,123,1 : Screen Close 1
Pen 1 : Paper 0 : Locate ,24 : Centre "Click to continue"
Repeat : MK=Mouse Key : Until MK>0
Screen 0 : Cls 0 : Amal Off : Bob Off : Limit Mouse : Ink 1,0
Text 30,150,"Back home..."
Sam Loop Off : Wait 150 : Cls 0 : Run "kids-7:title.amos"
End Proc